﻿@using Mvc2Ng.Web.UI.Core.Extensions.EditorForModel
@model Mvc2Ng.Web.UI.Models.EditProject
<section class="mainbar" data-ng-controller="editproject as vm">
  <section class="matter">
    <div class="container">
      <div class="row">
        <div class="widget wgreen">
          <div data-cc-widget-header title="{{vm.title}}"></div>
          <div class="widget-content user">
            <p>
              Fine tune your project, invite contributors, and pre-set publishing options.
            </p>
            <form role="form" data-ng-submit="editProject()">
              @Html.AngularEditorForModel()
              <button type="button" data-ng-click="cancel()" class="btn btn-danger pull-left">Cancel</button>
              <button type="submit" class="btn btn-default pull-right">Save</button>
            </form>
          </div>
        </div>
        <div class="panel panel-warning" data-ng-show="!vm.isValid">
          <!-- Default panel contents -->
          <div class="panel-heading">Panel heading</div>
          <div class="panel-body">
            <p>{{vm.validationSummary}}</p>
          </div>
        </div>
      </div>
    </div>
  </section>
</section>
